﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteJN.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="jnagr.Web.ForestPets._default" %>

<%@ Register Src="~/Controls/checkright.ascx" TagPrefix="uc1" TagName="checkright" %>

<%@ Register Src="~/Controls/copyright.ascx" TagPrefix="uc1" TagName="copyright" %>
<%@ Register Src="~/Controls/petsub.ascx" TagPrefix="uc1" TagName="petsub" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        var sprovince = "";
        var scity = "";
        var scounty = "";
        var areas = "";
        var se = "";
        var sebm = "";
        var getdata = "";
        var level;
        var markerClusterer;
        var markers = [];
        var devid;
        var pt;
        var map;
        var data_info;
        var opts;
        var StartTime;
        var EndTime;
        $.extend($.fn.datagrid.methods, {
            getExcelXml: function (jq, param) {
                var worksheet = this.createWorksheet(jq, param);
                //alert($(jq).datagrid('getColumnFields'));
                var totalWidth = 0;
                var cfs = $(jq).datagrid('getColumnFields');
                for (var i = 1; i < cfs.length; i++) {
                    totalWidth += $(jq).datagrid('getColumnOption', cfs[i]).width;
                }
                //var totalWidth = this.getColumnModel().getTotalWidth(includeHidden);
                return '<?xml version="1.0" encoding="utf-8"?>' +//xml申明有问题，以修正，注意是utf-8编码，如果是gb2312，需要修改动态页文件的写入编码
            '<ss:Workbook xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:o="urn:schemas-microsoft-com:office:office">' +
            '<o:DocumentProperties><o:Title>' + param.title + '</o:Title></o:DocumentProperties>' +
            '<ss:ExcelWorkbook>' +
            '<ss:WindowHeight>' + worksheet.height + '</ss:WindowHeight>' +
            '<ss:WindowWidth>' + worksheet.width + '</ss:WindowWidth>' +
            '<ss:ProtectStructure>False</ss:ProtectStructure>' +
            '<ss:ProtectWindows>False</ss:ProtectWindows>' +
            '</ss:ExcelWorkbook>' +
            '<ss:Styles>' +
            '<ss:Style ss:ID="Default">' +
            '<ss:Alignment ss:Vertical="Top"  />' +
            '<ss:Font ss:FontName="arial" ss:Size="10" />' +
            '<ss:Borders>' +
            '<ss:Border  ss:Weight="1" ss:LineStyle="Continuous" ss:Position="Top" />' +
            '<ss:Border  ss:Weight="1" ss:LineStyle="Continuous" ss:Position="Bottom" />' +
            '<ss:Border  ss:Weight="1" ss:LineStyle="Continuous" ss:Position="Left" />' +
            '<ss:Border ss:Weight="1" ss:LineStyle="Continuous" ss:Position="Right" />' +
            '</ss:Borders>' +
            '<ss:Interior />' +
            '<ss:NumberFormat />' +
            '<ss:Protection />' +
            '</ss:Style>' +
            '<ss:Style ss:ID="title">' +
            '<ss:Borders />' +
            '<ss:Font />' +
            '<ss:Alignment  ss:Vertical="Center" ss:Horizontal="Center" />' +
            '<ss:NumberFormat ss:Format="@" />' +
            '</ss:Style>' +
            '<ss:Style ss:ID="headercell">' +
            '<ss:Font ss:Bold="1" ss:Size="10" />' +
            '<ss:Alignment  ss:Horizontal="Center" />' +
            '<ss:Interior ss:Pattern="Solid"  />' +
            '</ss:Style>' +
            '<ss:Style ss:ID="even">' +
            '<ss:Interior ss:Pattern="Solid"  />' +
            '</ss:Style>' +
            '<ss:Style ss:Parent="even" ss:ID="evendate">' +
            '<ss:NumberFormat ss:Format="yyyy-mm-dd" />' +
            '</ss:Style>' +
            '<ss:Style ss:Parent="even" ss:ID="evenint">' +
            '<ss:NumberFormat ss:Format="0" />' +
            '</ss:Style>' +
            '<ss:Style ss:Parent="even" ss:ID="evenfloat">' +
            '<ss:NumberFormat ss:Format="0.00" />' +
            '</ss:Style>' +
            '<ss:Style ss:ID="odd">' +
            '<ss:Interior ss:Pattern="Solid"  />' +
            '</ss:Style>' +
            '<ss:Style ss:Parent="odd" ss:ID="odddate">' +
            '<ss:NumberFormat ss:Format="yyyy-mm-dd" />' +
            '</ss:Style>' +
            '<ss:Style ss:Parent="odd" ss:ID="oddint">' +
            '<ss:NumberFormat ss:Format="0" />' +
            '</ss:Style>' +
            '<ss:Style ss:Parent="odd" ss:ID="oddfloat">' +
            '<ss:NumberFormat ss:Format="0.00" />' +
            '</ss:Style>' +
            '</ss:Styles>' +
            worksheet.xml +
            '</ss:Workbook>';
            },
            createWorksheet: function (jq, param) {
                // Calculate cell data types and extra class names which affect formatting
                var cellType = [];
                var cellTypeClass = [];
                //var cm = this.getColumnModel();
                var totalWidthInPixels = 0;
                var colXml = '';
                var headerXml = '';
                var visibleColumnCountReduction = 0;
                var cfs = $(jq).datagrid('getColumnFields');
                var colCount = cfs.length;
                for (var i = 1; i < colCount; i++) {
                    if (cfs[i] != '') {
                        var w = $(jq).datagrid('getColumnOption', cfs[i]).width;
                        totalWidthInPixels += w;
                        if (cfs[i] === "") {
                            cellType.push("None");
                            cellTypeClass.push("");
                            ++visibleColumnCountReduction;
                        }
                        else {
                            colXml += '<ss:Column ss:AutoFitWidth="1" ss:Width="130" />';
                            headerXml += '<ss:Cell ss:StyleID="headercell">' +
                        '<ss:Data ss:Type="String">' + $(jq).datagrid('getColumnOption', cfs[i]).title + '</ss:Data>' +
                        '<ss:NamedCell ss:Name="Print_Titles" /></ss:Cell>';
                            cellType.push("String");
                            cellTypeClass.push("");
                        }
                    }
                }
                var visibleColumnCount = cellType.length - visibleColumnCountReduction;
                var result = {
                    height: 9000,
                    width: Math.floor(totalWidthInPixels * 30) + 50
                };
                var rows = $(jq).datagrid('getRows');
                // Generate worksheet header details.
                var t = '<ss:Worksheet ss:Name="' + param.title + '">' +
            '<ss:Names>' +
            '<ss:NamedRange ss:Name="Print_Titles" ss:RefersTo="=\'' + param.title + '\'!R1:R2" />' +
            '</ss:Names>' +
            '<ss:Table x:FullRows="1" x:FullColumns="1"' +
            ' ss:ExpandedColumnCount="' + (visibleColumnCount + 2) +
            '" ss:ExpandedRowCount="' + (rows.length + 2) + '">' +
            colXml +
            '<ss:Row ss:AutoFitHeight="1">' +
            headerXml +
            '</ss:Row>';
                // Generate the data rows from the data in the Store
                //for (var i = 0, it = this.store.data.items, l = it.length; i < l; i++) {
                for (var i = 0, it = rows, l = it.length; i < l; i++) {
                    t += '<ss:Row>';
                    var cellClass = (i & 1) ? 'odd' : 'even';
                    r = it[i];
                    var k = 0;
                    for (var j = 1; j < colCount; j++) {
                        //if ((cm.getDataIndex(j) != '')
                        if (cfs[j] != '') {
                            //var v = r[cm.getDataIndex(j)];
                            var v = r[cfs[j]];
                            if (cellType[k] !== "None") {
                                t += '<ss:Cell ss:StyleID="' + cellClass + cellTypeClass[k] + '"><ss:Data ss:Type="' + cellType[k] + '">';
                                if (cellType[k] == 'DateTime') {
                                    t += v.format('Y-m-d');
                                } else {
                                    t += v;
                                }
                                t += '</ss:Data></ss:Cell>';
                            }
                            k++;
                        }
                    }
                    t += '</ss:Row>';
                }
                result.xml = t + '</ss:Table>' +
            '<x:WorksheetOptions>' +
            '<x:PageSetup>' +
            '<x:Layout x:CenterHorizontal="1" x:Orientation="Landscape" />' +
            '<x:Footer x:Data="Page &P of &N" x:Margin="0.5" />' +
            '<x:PageMargins x:Top="0.5" x:Right="0.5" x:Left="0.5" x:Bottom="0.8" />' +
            '</x:PageSetup>' +
            '<x:FitToPage />' +
            '<x:Print>' +
            '<x:PrintErrors>Blank</x:PrintErrors>' +
            '<x:FitWidth>1</x:FitWidth>' +
            '<x:FitHeight>32767</x:FitHeight>' +
            '<x:ValidPrinterInfo />' +
            '<x:VerticalResolution>600</x:VerticalResolution>' +
            '</x:Print>' +
            '<x:Selected />' +
            '<x:DoNotDisplayGridlines />' +
            '<x:ProtectObjects>False</x:ProtectObjects>' +
            '<x:ProtectScenarios>False</x:ProtectScenarios>' +
            '</x:WorksheetOptions>' +
            '</ss:Worksheet>';
                return result;
            }
        });
        function Save_Excel() {//导出Excel文件
            //getExcelXML有一个JSON对象的配置，配置项看了下只有title配置，为excel文档的标题
            var data = $('#tt').datagrid('getExcelXml', { title: 'datagrid import to excel' }); //获取datagrid数据对应的excel需要的xml格式的内容
            //用ajax发动到动态页动态写入xls文件中
            var url = '../admin/gridtoexcel.ashx'; //如果为asp注意修改后缀
            $.ajax({
                url: url, data: { data: data }, type: 'POST', dataType: 'text',
                success: function (fn) {
                    alert('导出excel成功！');
                    window.location = fn; //执行下载操作
                },
                error: function (xhr) {
                    alert('动态页有问题\nstatus：' + xhr.status + '\nresponseText：' + xhr.responseText)
                }
            });
            return false;
        }


        $(function () {
            curmenu('幼虫动态');
            $.ajax({
                type: "post",
                dataType: "json",
                url: "../admin/getinfo.ashx?action=level",
                success: function aa(data) {
                    sprovince = data[0].province;
                    scity = data[0].city;
                    scounty = data[0].county;
                    InitTree();
                    InitMap();
                }
            });
            $("#tab").tabs({
                onSelect: function (title, index) {
                    if (index == '2') {
                        hz();
                    }
                }
            });
        });

        function InitMapmark() {
            $('#win').datagrid({
                //title: '测报点列表', //表格标题
                url: '../devinfo/GetDev.ashx', //请求数据的页面
                sortName: 'mname', //排序字段
                idField: 'mid', //标识字段,主键
                iconCls: '', //标题左边的图标
                width: '95%', //宽度
                height: '95%', //高度
                nowrap: false, //是否换行，True 就会把数据显示在一行里
                striped: true, //True 奇偶行使用不同背景色
                collapsible: false, //可折叠
                sortOrder: 'desc', //排序类型
                remoteSort: true, //定义是否从服务器给数据排序
                fitColumns: true,
                singleSelect: true,
                method: 'post',
                columns: [[
	                { title: '测报站名', field: 'mname', width: 80, sortable: true }
                ]],
                toolbar: "#tab_toolbar",
                queryParams: { "action": "querydev", "dtype": "PET" },
                pageNumber: 1, //默认索引页
                pageSize: 500, //默认一页数据条数
                rownumbers: true, //行号
                pageList: [10, 20, 50, 200, 500],
                pagination: false, //是否开启分页                
                onLoadSuccess: function (data) {
                    data_info = [];
                    getdata = data;
                    map.clearOverlays();
                    $.each(data.rows, function (k, v) {
                        data_info.push({ "lng": v["mjd"], "lat": v["mwd"], "mlevel": v["DevType"], "mname": v["devname"], "madd": v["DevLocation"], "mpic": v["mpic"], "devid": v["DevID"] });
                    });
                    var mlevel;
                    var marker;
                    var ptt = "";
                    if (markers.length > 0) {
                        if (markerClusterer != null) {
                            markerClusterer.removeMarkers(markers);
                            markerClusterer = null;
                        }
                        markers = [];
                    }
                    for (var i = 0; i < data_info.length; i++) {
                        mlevel = data_info[i].mlevel;
                        ptt = new BMap.Point(data_info[i].lng, data_info[i].lat);
                        if (mlevel == 'CBD')
                            marker = new BMap.Marker(ptt, { icon: icon4 });
                        else if (mlevel == 'YBQ')
                            marker = new BMap.Marker(ptt, { icon: icon3 });
                        else if (mlevel == 'XQH')
                            marker = new BMap.Marker(ptt, { icon: icon2 });
                        else
                            marker = new BMap.Marker(ptt, { icon: icon1 });

                        var did = data_info[i].devid;
                        map.addOverlay(marker);
                        label = new BMap.Label(data_info[i].mname, { offset: new BMap.Size(20, -10) });
                        marker.setLabel(label);
                        markers.push(marker);
                        addClickHandler(did, marker);
                    }
                    if (markers.length > 0)
                        markerClusterer = new BMapLib.MarkerClusterer(map, { markers: markers });//对地图扩大缩小后会都所有的点全显示出来。
                    if (scounty != "")
                        map.centerAndZoom(scounty, 12);
                    else if (scity != "")
                        map.centerAndZoom(scity, 10);
                    else if (sprovince != "")
                        map.centerAndZoom(sprovince, 8);
                    else
                        map.centerAndZoom("西安", 5);
                    if (areas != "")
                        getBoundary(areas);
                    renderstation();
                }
            });
        }
        function addClickHandler(did, marker) {
            marker.addEventListener("click", function (e) {
                showawsinfectInfo(did);

            }
            );
        }
        function InitTree() {
            $('#pt').tree({
                width: '100%', //宽度 
                lines: true,
                //data: provincetree,   
                url: '../areainfo/GetArea.ashx', //请求数据的页面 
                method: 'post',
                queryParams: { "action": "querymyareauser" },
                onBeforeExpand: function (node) {
                    $("#pt").tree("options").queryParams = { "action": "queryyb" };
                    $('#pt').tree('options').url = "../areainfo/GetArea.ashx?pid=" + node.id;
                },
                onClick: function (node) {
                    if (node.text != "") {
                        sebm = node.bm;
                        //获取地区全称
                        if (sebm == "0")
                            areas = "";
                        else if (sebm.length == 6 && sebm.indexOf("0000")) {
                            areas = node.text;
                        }
                        else {
                            var result = $.ajax({
                                url: "../areainfo/GetArea.ashx?action=queryarea",
                                type: 'post',
                                dataType: 'json',
                                async: false,
                                cache: false
                            }).responseText;
                            areas = result;
                        }
                        reloadgridTree();
                    }

                },
                onLoadSuccess: function (node, param) {

                }
            });
            $('#hzgrid').datagrid({
                title: '幼虫动态', //表格标题
                url: '../forestpets/GetPets.ashx', //请求数据的页面
                sortName: 'inputTime', //排序字段
                idField: 'fp_id', //标识字段,主键
                iconCls: '', //标题左边的图标
                width: '100%', //宽度
                height: 400,
                nowrap: false, //是否换行，True 就会把数据显示在一行里
                striped: true, //True 奇偶行使用不同背景色
                collapsible: false, //可折叠
                sortOrder: 'desc', //排序类型
                remoteSort: true, //定义是否从服务器给数据排序
                fitColumns: true,
                singleSelect: true,
                method: 'post',
                columns: [[//							                    
                   { title: '区域', field: 'address', width: 150, sortable: true },
                    { title: '虫名', field: 'hname', width: 150 },
                    {
                        title: '幼虫动态', field: 'totalUnit', width: 150, formatter: function (value, row, index) {
                            var m = 0, f = 0;
                            if (row.maleNums != "") m = parseInt(row.maleNums);
                            if (row.femaleNums != "") f = parseInt(row.femaleNums);
                            return m + f;
                        }
                    }
                ]
                ],
                toolbar: "#hztoolbar",
                pagination: true, //是否开启分页
                pageNumber: 1, //默认索引页
                pageSize: 20, //默认一页数据条数
                rownumbers: true

            });
        }
        function showawsinfectInfo(id) {
            devid = id;
            addTab(devid, 'mywin.html');
        }

        var chs;
        var mpet = "";
        var mpetv = "";
        var griddata = "";
        var cadd = "";
        var dtOpstart = "";
        var dtOpend = "";
        var filterObj = "";
        var add = "";
        var uname = "";
        var qxchs;
        var level = 0;
        Array.prototype.deleteElementByValue = function (varElement) {
            var numDeleteIndex = -1;
            for (var i = 0; i < this.length; i++) {
                // 严格比较，即类型与数值必须同时相等。
                if (this[i] === varElement) {
                    this.splice(i, 1);
                    numDeleteIndex = i;
                    break;
                }
            }
            return numDeleteIndex;
        }
        function getfids(rows) {
            var ids = "";
            for (var i = 0; i < rows.length; i++)
                ids = ids + rows[i].fp_id + ",";
            if (ids != "")
                ids = ids.substr(0, ids.length - 1);
            return ids;

        }
        function getids(rows) {
            var ids = "";
            for (var i = 0; i < rows.length; i++)
                ids = ids + rows[i].uid + ",";
            if (ids != "")
                ids = ids.substr(0, ids.length - 1);
            return ids;

        }

        function InitGird() {
            var h = $("#my1").height();
            var w = $("#my1").width();
            $('#mtgrid').datagrid({
                title: '幼虫动态', //表格标题
                url: 'GetPets.ashx', //请求数据的页面
                sortName: 'inputTime', //排序字段
                idField: 'fp_id', //标识字段,主键
                iconCls: '', //标题左边的图标
                height: h,
                width: w,
                nowrap: false, //是否换行，True 就会把数据显示在一行里
                striped: true, //True 奇偶行使用不同背景色
                collapsible: false, //可折叠
                sortOrder: 'desc', //排序类型
                remoteSort: true, //定义是否从服务器给数据排序
                fitColumns: true,
                singleSelect: false,
                method: 'post',
                columns: [[//
                    //{ field: 'ckb', checkbox: true },
                    { title: '区域', field: 'address', width: 150, sortable: true },
                    { title: '树种', field: 'pname', width: 150 },
                    { title: '虫名', field: 'hname', width: 150 },
                    { title: '虫态', field: 'petStage', width: 150 },
                    { title: '虫龄', field: 'larvaAge', width: 150 },
                    { title: '受害部位', field: 'damageParts', width: 150 },
                    { title: '统计单位', field: 'totalUnit', width: 150 },
                    { title: '统计数据', field: 'totalCount', width: 150 },
                    {
                        title: '发生程度', field: 'happenpro', width: 100
                    },
                    { title: '监测人', field: 'uname', width: 80 },
                    { title: '监测点', field: 'mname', width: 150 },
                    {
                        title: '监测时间', field: 'inputTime', width: 200, formatter: function (value, row, index) {
                            if (value != "") {

                                if (value.indexOf("-") != -1)
                                    value = value.replace(/-/g, "/")
                                return new Date(value).pattern("yyyy年M月d日");
                            }
                        }
                    }
                ]
                ],
                rowStyler: function (index, row) {
                    var value = row.happenpro;
                    if (value == '轻度以下') {
                        return 'color:green; font-weight:bold;';
                    }
                    else if (value == '轻度') {
                        return 'color:blue; font-weight:bold;';
                    }
                    else if (value == '中度') {
                        return 'color:#FF00FF; font-weight:bold;';
                    }
                    else if (value == '重度') {
                        return 'color:red; font-weight:bold;';
                    }
                },
                toolbar: "#tab_toolbars",
                queryParams: { "action": "query", "toolsNums": devid, "StartTime": $("#StartTime").datebox("getValue"), "EndTime": $("#EndTime").datebox("getValue") },
                pagination: true, //是否开启分页
                pageNumber: 1, //默认索引页
                pageSize: 20, //默认一页数据条数
                rownumbers: true,
                onLoadSuccess: function (data) {
                    griddata = data;
                    var max = 0;
                    var min = 0;
                    var sum = 0;
                    var pets = "";
                    var temp = 0;
                    var nums = 0;
                    var maxt = "";
                    var mint = "";
                    var sresult = "";
                    var snum = 0;
                    var result = "";
                    dtOpstart = $('#StartTime').datebox('getValue');
                    dtOpend = $('#EndTime').datebox('getValue');
                    $.each(data.rows, function (k, v) {
                        temp = v["hname"];
                        if (pets.indexOf(temp) == -1) {
                            pets = pets + temp + ",";
                            nums = nums + 1;
                        }
                    });
                    var strs = new Array(); //定义一数组
                    if (pets.length > 0) pets = pets.substr(0, pets.length - 1);
                    strs = pets.split(","); //字符分割 
                    for (i = 0; i < strs.length ; i++) {
                        max = 0;
                        sum = 0;
                        maxt = "";
                        mint = "";
                        snum = 0;
                        sresult = "";
                        if ($("#ptype").combobox('getValue') == "成虫") {
                            if (data.rows.length > 0) min = parseInt(data.rows[0]["maleNums"]) + parseInt(data.rows[0]["femaleNums"]);
                            $.each(data.rows, function (k, v) {
                                if (v["hname"] == strs[i]) {
                                    temp = parseInt(v["maleNums"]) + parseInt(v["femaleNums"]);
                                    if (temp >= max) { max = temp; maxt = v["inputTime"]; }
                                    if (temp <= min) { min = temp; mint = v["inputTime"]; }
                                    sum = sum + temp;
                                    snum = snum + 1;
                                }
                            });
                            if (snum > 0)
                                sresult = "其中" + strs[i] + "，最大数为：" + max + ",发生日期是：" + maxt + "，最小数为：" + min + "，发生日期是：" + mint + "，平均数为：" + sum / snum + "。";

                        }
                        else {
                            if (data.rows.length > 0) min = parseInt(data.rows[0]["totalCount"]);
                            $.each(data.rows, function (k, v) {
                                if (v["hname"] == strs[i]) {
                                    temp = parseInt(v["totalCount"]);
                                    if (temp > max) { max = temp; maxt = v["inputTime"]; }
                                    if (temp < min) { min = temp; mint = v["inputTime"]; }
                                    sum = sum + temp;
                                    snum = snum + 1;
                                }
                            });
                            if (snum > 0)
                                sresult = "其中" + strs[i] + "最大数为：" + max + ",发生日期是：" + maxt + "，最小数为：" + min + "，发生日期是：" + mint + "，平均数为：" + sum / snum + "。";
                        }
                        //统计结果
                        result = result + sresult;
                    }
                    if (dtOpstart != "") dtOpstart = dtOpstart + "到";
                    if (dtOpend != "") dtOpstart = dtOpstart + dtOpend;
                    result = dtOpstart + "，" + add + "的用户" + name + "上报的数据中共中害虫" + nums + "种，分别为：" + pets + "。" + result;

                    $('#mmark').val(result);

                }
            });
            Highcharts.setOptions({
                lang: {
                    contextButtonTitle: "图表导出菜单",
                    decimalPoint: ".",
                    downloadJPEG: "下载JPEG图片",
                    downloadPDF: "下载PDF文件",
                    downloadPNG: "下载PNG文件",
                    downloadSVG: "下载SVG文件",
                    drillUpText: "返回 {series.name}",
                    loading: "加载中",
                    months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
                    noData: "没有数据",
                    numericSymbols: ["千", "兆", "G", "T", "P", "E"],
                    printChart: "打印图表",
                    resetZoom: "恢复缩放",
                    resetZoomTitle: "恢复图表",
                    shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
                    thousandsSep: ",",
                    weekdays: ["星期一", "星期二", "星期三", "星期三", "星期四", "星期五", "星期六", "星期天"]
                }
            });

        }
        function getQueryParams(queryParams) {
            var StartTime = $("#StartTime").datebox("getValue");
            var EndTime = $("#EndTime").datebox("getValue");
            var idstr = $("#idstr").val();
            var idh = $("#idh").val();
            var otype = $("#otype").val();
            var ptype = $("#ptype").val();
            mpet = $("#mypets").combobox("getValue");
            queryParams.StartTime = StartTime;
            queryParams.EndTime = EndTime;
            queryParams.idstr = idstr;
            queryParams.idh = idh;
            queryParams.otype = otype;
            queryParams.mypet = mpet;
            queryParams.ptype = ptype;
            return queryParams;

        }
        //增加查询参数，重新加载表格  
        function reloadgrid() {
            var queryParams = $('#mtgrid').datagrid('options').queryParams;
            getQueryParams(queryParams);
            $('#mtgrid').datagrid('options').queryParams = queryParams;
            $("#mtgrid").datagrid('reload');

        }
        var wchartInstance;
        var WChartJS = {
            init: function (chs) {
                var s = "[";
                $.each(chs, function () {
                    s = s + "{name:'" + this + "',data:[]},";
                });
                s = s.substr(0, s.length - 1);
                s = s + "]";
                wchartInstance = new Highcharts.Chart({
                    chart: {
                        renderTo: 'chartArea',
                        type: 'line'
                    },
                    credits: {
                        enabled: false
                    },
                    exporting: {
                        enabled: true
                    },
                    title: {
                        text: '',
                        x: -20 //center
                    },
                    xAxis: {
                        type: 'datetime',
                        labels: {
                            step: 4,
                            formatter: function () {
                                return new Date(this.value).toLocaleDateString();
                            }
                        }
                    },
                    plotOptions: {
                        series: {
                            events: {
                                legendItemClick: function () {
                                    var visibility = this.visible ? 'visible' : 'hidden';
                                    if (visibility == 'hidden') {
                                        for (var i = 0; i < qxchs.length; i++) {
                                            wchartInstance.series[i].hide();
                                        }
                                    }
                                    return true;
                                }
                            }
                        }
                    },
                    yAxis: {
                        title: {
                            text: '数值'
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        formatter: function () {
                            if (this.series.name == '风向') {
                                var d = this.y;
                                var res = "";
                                if (d < 15 || d >= 345)
                                    res = "北";
                                else if (d >= 15 && d < 45)
                                    res = "东北偏北";
                                else if (d >= 45 && d < 75)
                                    res = "东北偏东";
                                else if (d >= 75 && d < 105)
                                    res = "东";
                                else if (d >= 105 && d < 135)
                                    res = "东南偏东";
                                else if (d >= 135 && d < 165)
                                    res = "东南偏南";
                                else if (d >= 165 && d < 195)
                                    res = "南";
                                else if (d >= 195 && d < 225)
                                    res = "西南偏南";
                                else if (d >= 225 && d < 255)
                                    res = "西南偏西";
                                else if (d >= 255 && d < 285)
                                    res = "西";
                                else if (d >= 285 && d < 315)
                                    res = "西北偏西";
                                else if (d >= 315 && d < 345)
                                    res = "西北偏北";
                                return '<b>' + this.series.name + '：</b>' + res + '<br/> <b>时间：</b>' + new Date(this.x).toLocaleString();
                            }
                            else
                                return '<b>' + this.series.name + '：</b>' + this.y + '<br/> <b>时间：</b>' + new Date(this.x).toLocaleString();
                        }

                    },
                    legend: {
                        //layout: 'vertical',
                        align: 'center',
                        verticalAlign: 'top',
                        borderWidth: 0
                    },
                    series: eval(s)
                });
            }
        };

        var CRUD = {
            init: function () {
                if (phone == "") {
                    $.messager.alert("提示", "对不起，这个用户没有小气候数据！", "info");
                    return;
                }
                filterObj = "";
                dtOpstart = $('#StartTime').datebox('getValue');
                dtOpend = $('#EndTime').datebox('getValue');
                var ruleArr = [];
                if (dtOpstart != '')
                    ruleArr.push({ "field": "datetime", "op": "ge", "data": dtOpstart });
                if (dtOpend != '')
                    ruleArr.push({ "field": "datetime", "op": "le", "data": dtOpend });
                if (ruleArr.length > 0) {
                    filterObj = { groupOp: 'AND', rules: ruleArr };
                    $('body').data('where', filterObj);
                }
                jQuery.getJSON(qxurl + '/Dev/ashx/DevCon.ashx?action=getmylist&XQHID=' + phone + '&r=' + Math.floor(Math.random() * (1000 + 1)), null, function (data) {
                    mpet = $("#mypets").combobox("getText");

                    var mchs = data.XQHID;
                    qxchs = mchs.split(',');
                    qxchs.deleteElementByValue("风向");
                    if (qxchs.length != 0) {
                        if (mpet != "" && mpet != "全部") {
                            if ($("#ptype").combobox('getValue') == "成虫")
                                mchs = mchs + "," + mpet + "雌虫," + mpet + "雄虫," + mpet + "成虫";
                            else
                                mchs = mchs + "," + mpet + "统计";
                            chs = mchs.split(',');
                            chs.deleteElementByValue("风向");
                            WChartJS.init(chs);
                            CRUD.show();
                        }
                        else {
                            $.messager.alert("提示", "对不起，请选择虫子！", "info");
                            return;
                        }
                    }
                    else {
                        $.messager.alert("提示", "对不起，小气候数据没有参数！", "info");
                    }
                });
            },
            show: function () {

                //WChartJS.init(chs);
                var rows = $('#tt').datagrid('getPager').data("pagination").options.pageSize;
                jQuery.getJSON(qxurl + '/status_xqh/ashx/XQH.ashx?action=phoneavg&devID=' + phone + '&filter=' + JSON.stringify(filterObj) + '&page=1&rows=' + rows + '&r=' + Math.floor(Math.random() * (1000 + 1)), null, function (data) {
                    if (data.rows.length == 0) {
                        $.messager.alert("提示", "满足此条件的气候数据不存在！", "info");
                        return;
                    }
                    var md;
                    var t1 = "", t2 = "", t3 = "";
                    if ($("#ptype").combobox('getValue') != "成虫") {
                        var n = chs.length - 1;
                        for (var i = 0; i < n; i++) {
                            t1 = "";
                            $.each(data.rows, function (k, v) {
                                md = v["datetime"];
                                md = md.replace(/-/g, "/");
                                md = Date.parse(md);
                                t1 = "[" + md + "," + v[chs[i]] + "]," + t1;

                            });
                            t1 = "[" + t1 + "]";
                            wchartInstance.series[i].setData(eval(t1));
                        }
                        t1 = "";
                        $.each(griddata.rows, function (k, v) {
                            md = v["inputTime"];
                            md = md.replace(/-/g, "/");
                            md = Date.parse(md);
                            t1 = "[" + md + "," + v["totalCount"] + "]," + t1;

                        });
                        t1 = "[" + t1 + "]";
                        wchartInstance.series[n].setData(eval(t1));
                    }
                    else {
                        var n = chs.length - 3;
                        for (var i = 0; i < n; i++) {
                            t1 = "";
                            $.each(data.rows, function (k, v) {
                                md = v["datetime"];
                                md = md.replace(/-/g, "/");
                                md = Date.parse(md);
                                t1 = "[" + md + "," + v[chs[i]] + "]," + t1;

                            });
                            t1 = "[" + t1 + "]";
                            wchartInstance.series[i].setData(eval(t1));
                        }
                        t1 = "";
                        var fmc = "";
                        $.each(griddata.rows, function (k, v) {
                            md = v["inputTime"];
                            md = md.replace(/-/g, "/");
                            md = Date.parse(md);
                            t1 = "[" + md + "," + v["femaleNums"] + "]," + t1;
                            t2 = "[" + md + "," + v["maleNums"] + "]," + t2;
                            fmc = parseInt(v["femaleNums"]) + parseInt(v["maleNums"]);
                            t3 = "[" + md + "," + fmc + "]," + t3;

                        });
                        t1 = "[" + t1 + "]";
                        t2 = "[" + t2 + "]";
                        t3 = "[" + t3 + "]";
                        wchartInstance.series[chs.length - 3].setData(eval(t1));
                        wchartInstance.series[chs.length - 2].setData(eval(t2));
                        wchartInstance.series[chs.length - 1].setData(eval(t3));
                    }
                    for (var i = 0; i < qxchs.length; i++) {
                        if (i != 0)
                            wchartInstance.series[i].hide();
                    }

                });
            }
        };
       
        function showxc() {
            $.ajax({
                type: "post",
                dataType: "json",
                url: "../admin/getinfo.ashx?action=level",
                success: function aa(data) {
                    var level = data[0].level;
                    if (level != 5 && level != 1) {
                        $("#a_del").hide();
                    }
                }
            });
            year = new Date().getFullYear();
            $('#jd').combobox({
                onSelect: function (newValue, oldValue) {
                    if (newValue.text == '一季度') {
                        $("#StartTime").datebox("setValue", year + "-1-1");
                        $("#EndTime").datebox("setValue", year + "-3-31");
                    }
                    else if (newValue.text == '二季度') {
                        $("#StartTime").datebox("setValue", year + "-4-1");
                        $("#EndTime").datebox("setValue", year + "-6-30");
                    }
                    else if (newValue.text == '三季度') {
                        $("#StartTime").datebox("setValue", year + "-7-1");
                        $("#EndTime").datebox("setValue", year + "-9-30");
                    }
                    else if (newValue.text == '四季度') {
                        $("#StartTime").datebox("setValue", year + "-10-1");
                        $("#EndTime").datebox("setValue", year + "-12-31");
                    }
                    else if (newValue.text == '当天') {
                        var curr_time = new Date();
                        var tc_time = new Date(curr_time.getTime() + 24 * 60 * 60 * 1000);
                        var strDate = curr_time.getFullYear() + "-";
                        strDate += curr_time.getMonth() + 1 + "-";
                        strDate += curr_time.getDate();
                        var strDateend = tc_time.getFullYear() + "-";
                        strDateend += tc_time.getMonth() + 1 + "-";
                        strDateend += tc_time.getDate();
                        $("#StartTime").datebox("setValue", strDate);
                        $("#EndTime").datebox("setValue", strDateend);
                    }
                }
            });
            var curr_time = new Date();
            var tc_time = new Date(curr_time.getTime() + 24 * 60 * 60 * 1000);
            var strDate = curr_time.getFullYear() + "-";
            strDate += curr_time.getMonth() + 1 + "-";
            strDate += curr_time.getDate();
            var strDateend = tc_time.getFullYear() + "-";
            strDateend += tc_time.getMonth() + 1 + "-";
            strDateend += tc_time.getDate();
            $("#StartTime").datebox("setValue", strDate);
            $("#EndTime").datebox("setValue", strDateend);

            $('#mypets').combobox({
                url: 'GetPets.ashx?action=mypet&devid=' + devid,
                valueField: 'mhid',
                textField: 'hname',
                panelHeight: 'auto',
                editable: false,
                onLoadSuccess: function () {
                    if (cadd == "") {
                        var cdata = $('#mypets').combobox('getData');
                        cdata.unshift({ "hname": "全部", "mhid": "0" });
                        cadd = "a";
                        $("#mypets").combobox('loadData', cdata);
                    }
                    else {
                        $("#mypets").combobox('select', 0);
                    }
                }
            });           
            
            InitGird();
            $("#yjfx").panel({
                href: '../html/alarmall.html',
                title: '幼虫预警',
                tools: [{ iconCls: 'icon-phone', handler: function () { sendAlarm('虫情预警'); } }],
                onLoad: function () {
                    InitSendUser();
                    $("#btnyj").click(function () {
                        sendAlarm('虫情预警');
                    });
                }

            });
            
        }
        function hz() {
            year = new Date().getFullYear();
            $('#jdhz').combobox({
                onSelect: function (newValue, oldValue) {
                    if (newValue.text == '一季度') {
                        $("#txtstart").datebox("setValue", year + "-1-1");
                        $("#txtend").datebox("setValue", year + "-3-31");
                    }
                    else if (newValue.text == '二季度') {
                        $("#txtstart").datebox("setValue", year + "-4-1");
                        $("#txtend").datebox("setValue", year + "-6-30");
                    }
                    else if (newValue.text == '三季度') {
                        $("#txtstart").datebox("setValue", year + "-7-1");
                        $("#txtend").datebox("setValue", year + "-9-30");
                    }
                    else if (newValue.text == '四季度') {
                        $("#txtstart").datebox("setValue", year + "-10-1");
                        $("#txtend").datebox("setValue", year + "-12-31");
                    }
                    else if (newValue.text == '当天') {
                        var curr_time = new Date();
                        var tc_time = new Date(curr_time.getTime() + 24 * 60 * 60 * 1000);
                        var strDate = curr_time.getFullYear() + "-";
                        strDate += curr_time.getMonth() + 1 + "-";
                        strDate += curr_time.getDate();
                        var strDateend = tc_time.getFullYear() + "-";
                        strDateend += tc_time.getMonth() + 1 + "-";
                        strDateend += tc_time.getDate();
                        $("#txtstart").datebox("setValue", strDate);
                        $("#txtend").datebox("setValue", strDateend);
                    }
                }
            });
        }
        function InitGirdHZ() {
            $('#pt1').tree({
                url: '../harmfulinfo/GetHarm.ashx?type=8', //请求数据的页面               
                width: '100%', //宽度                
                lines: true,
                method: 'post',
                queryParams: { "action": "queryt" },
                onClick: function (node) {
                    if (node.text != "") {
                        if (node.type == "1") {
                            $('#idh').val(node.text);
                        }
                        else if (node.type == "2") {
                            $('#city').val(node.bm);
                        }

                    }
                },
                onLoadSuccess: function (node, param) {
                    $('#pt').tree("collapseAll");
                    var node = $('#pt').tree("getRoot");
                    if (node)
                        $('#pt').tree("expand", node.target);
                }
            });
            $('#hzgrid').datagrid({
                title: '病虫动态', //表格标题
                url: 'GetPets.ashx', //请求数据的页面
                sortName: 'inputTime', //排序字段
                idField: '_id', //标识字段,主键
                iconCls: '', //标题左边的图标
                width: '100%', //宽度
                nowrap: false, //是否换行，True 就会把数据显示在一行里
                striped: true, //True 奇偶行使用不同背景色
                collapsible: false, //可折叠
                sortOrder: 'desc', //排序类型
                remoteSort: true, //定义是否从服务器给数据排序
                fitColumns: true,
                singleSelect: true,
                method: 'post',
                onLoadSuccess: function (data) {
                    otype = $('#otype').val();
                    ptype = $('#ptype').combobox('getText');
                    var md;
                    tc1 = "";
                    tc2 = "";
                    tc3 = "";
                    tc4 = "";
                    if (otype != '1') {
                        pseries = "轻度,中度,重度";
                        pseries = pseries.split(",");
                        WChartJS.init(pseries);
                        $.each(data.rows, function (k, v) {
                            md = v["hname"];
                            tc1 += v["l"] + ",";
                            tc2 += v["c"] + ",";
                            tc3 += v["h"] + ",";
                            tc4 += "'" + md + "',";
                        });
                        tc1 = "[" + tc1 + "]";
                        tc2 = "[" + tc2 + "]";
                        tc3 = "[" + tc3 + "]";
                        tc4 = "[" + tc4 + "]";
                        wchartInstance.series[0].setData(eval(tc1));
                        wchartInstance.series[1].setData(eval(tc2));
                        wchartInstance.series[2].setData(eval(tc3));
                        wchartInstance.xAxis[0].setCategories(eval(tc4));
                    }
                    else {

                        pseries = $('#idh').val() + "轻度," + $('#idh').val() + "中度," + $('#idh').val() + "重度";
                        pseries = pseries.split(",");
                        WChartJS.init(pseries);
                        $.each(data.rows, function (k, v) {
                            md = v["areas"];
                            tc1 += v["l"] + ",";
                            tc2 += v["c"] + ",";
                            tc3 += v["h"] + ",";
                            tc4 += "'" + md + "',";
                        });
                        tc1 = "[" + tc1 + "]";
                        tc2 = "[" + tc2 + "]";
                        tc3 = "[" + tc3 + "]";
                        tc4 = "[" + tc4 + "]";
                        wchartInstance.series[0].setData(eval(tc1));
                        wchartInstance.series[1].setData(eval(tc2));
                        wchartInstance.series[2].setData(eval(tc3));
                        wchartInstance.xAxis[0].setCategories(eval(tc4));
                    }
                },
                columns: [[
                    { title: '地区', field: 'areas', rowspan: 2, width: 100 },
                    { title: '有害生物种类', field: 'hname', rowspan: 2, width: 150 },
                    { title: '调查阶段', field: 'Stage', rowspan: 2, width: 80 },
                    { title: '统计单位', field: 'totalUnit', rowspan: 2, width: 80 },
                    { title: '发生程度面积（公顷）', field: 'a', colspan: 3, align: 'center' }],
                    [
                        {
                            title: '轻度', field: 'l', align: 'center', width: 80
                        },
                        {
                            title: '中度', field: 'c', align: 'center', width: 80
                        },
                        {
                            title: '重度', field: 'h', align: 'center', width: 80
                        }
                    ]
                ],
                toolbar: "#tab_toolbar",
                queryParams: { "action": "queryca" },
                pagination: false, //是否开启分页
                pageNumber: 1, //默认索引页
                pageSize: 100, //默认一页数据条数
                rownumbers: true //行号
            });
        }
        function gethname(nodes) {
            var ids = "";
            for (var i = 0; i < nodes.length; i++)
                ids = ids + nodes[i].text + ",";
            if (ids != "")
                ids = ids.substr(0, ids.length - 1);
            return ids;

        }
        var wchartInstance;
        var WChartJS = {
            init: function (chs) {
                var s = "[";
                $.each(chs, function () {
                    //s = s + "{name:'" + this + "',data:[],dataLabels:{enabled: true,rotation: -90,color: '#FFFFFF',align: 'right', x: 4,y: 10,style: { fontSize: '13px',fontFamily: 'Verdana, sans-serif',textShadow: '0 0 3px black'}}},";
                    s = s + "{name:'" + this + "',data:[],dataLabels:{enabled: true}},";
                });
                s = s.substr(0, s.length - 1);
                s = s + "]";
                wchartInstance = new Highcharts.Chart({
                    chart: {
                        renderTo: 'chartArea',
                        type: 'column'
                    },
                    credits: {
                        enabled: false
                    },
                    exporting: {
                        enabled: true
                    },
                    title: {
                        text: '',
                        x: -20 //center
                    },
                    plotOptions: {
                        column: {
                            //stacking: 'normal',
                            //dataLabels: {
                            //    enabled: true,
                            //    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
                            //}
                        }
                    },
                    xAxis: {
                        type: 'category',
                        labels: {
                            formatter: function () {
                                return this.value;
                            }
                        }
                    },
                    yAxis: {
                        title: {
                            text: '数值'
                        },
                        stackLabels: {
                            enabled: true,
                            style: {
                                fontWeight: 'bold',
                                color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                            }
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        formatter: function () {
                            //return '<b>' + this.series.name + '：</b>' + this.y + '<br/> ';
                            var str = '<b>' + this.x + '</b><br>' +
                    this.series.name + ': ' + this.y;
                            return str;
                        }
                    },
                    legend: {
                        align: 'center',
                        verticalAlign: 'top',
                        borderWidth: 0
                    },
                    series: eval(s)
                });
            }
        };
        function getids(nodes) {
            var ids = "";
            for (var i = 0; i < nodes.length; i++)
                ids = ids + nodes[i].id + ",";
            if (ids != "")
                ids = ids.substr(0, ids.length - 1);
            return ids;

        }
        function getQueryParamshz(queryParams) {
            var StartTime = $("#txtstart").datebox("getValue");
            var EndTime = $("#txtend").datebox("getValue");
            var hnodes = $('#pt1').tree('getChecked');
            var jg = $("#jg").combobox('getValue');

            queryParams.sebm = sebm;

            if (hnodes.length != 0) {
                var idh = getids(hnodes);
                queryParams.idh = idh;
            }
            else {
                queryParams.idh = "";
            }
            var pids = getids(hnodes);

            queryParams.StartTime = StartTime;
            queryParams.EndTime = EndTime;
            queryParams.jg = jg;
            return queryParams;

        }
        //增加查询参数，重新加载表格  
        function reloadgridhz(t) {
            $('#otype').val(t);
            if (t == '1') {
                if ($("#idh").val() == '') {
                    $.messager.alert("提示", "请选择虫子！", "info");
                    return;
                }
            }
            var queryParams = $('#hzgrid').datagrid('options').queryParams;
            getQueryParams(queryParams);
            $('#hzgrid').datagrid('options').queryParams = queryParams;
            $("#hzgrid").datagrid('reload');
        }
    </script>
     <script id="tmpstations" type="text/html">
        {{each rows as value index}}
        <div class="stations">
            <div class="level1Div" onclick="showawsinfectInfo('{{value.DevID}}')">
                <div class="levelsb">{{value.devname}}</div>
                <div class="leveltime">时间：{{value.mdatetime}} 已运行{{value.days}}天</div>
                <div class="levelbottom">
                    <div class="levelpet">{{value.updata}}<br />{{value.updateTime}}</div>                    
                </div>
            </div>
        </div>
        {{/each}} 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="mainDiv">
        <uc1:checkright runat="server" ID="checkright" />
        
        <uc1:petsub runat="server" id="petsub" />
        <div>
            <div id="contentDiv">
                <div class="mypt">
                    <ul id="pt"></ul>
                </div>
                <div id="mycontent">
                    <div id="tab" class="easyui-tabs">
                        <div title="GSI" style="padding: 5px;">

                            <div style="position: relative;">
                                <div id="mymap"></div>
                                <div id="Maptype" style="height: 87px; width: 130px; position: absolute; float: left; margin-left: 850px; top: 50px; z-index: 99; color: Black; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px;">
                                    <input id="CBstationname" onclick="ShowstationName('checkbox')" checked="checked" style="float: left; margin-left: 10px;"
                                        type="checkbox" />
                                    <label onclick="ShowstationName('label')" style="height: 20px; width: 100px; float: left; text-align: left; font-size: 13px; font-family: 宋体; font-weight: bold; margin-top: 3px; cursor: pointer;">
                                        显示名称</label>
                                </div>
                            </div>

                        </div>
                        <div title="设备列表" style="overflow: auto; padding: 5px;">
                            <div id="mystations"></div>
                        </div>
                        <div title="汇总" style="padding: 5px;">
                            <div id="hz" class="easyui-layout" data-options="fit:true">
                                <div region="west" split="true" style="width: 100px;" id="west">
                                    <div data-options="region:'center'" style="overflow-y: auto">
                                        <ul id="pt1"></ul>
                                    </div>

                                </div>
                                <div region="center" style="background: #eee; overflow-y: hidden">
                                    <div class="easyui-layout" data-options="fit:true">
                                        <div data-options="region:'center'">
                                            <table id="hzgrid">
                                            </table>
                                        </div>
                                        <div id="chartAreahz" data-options="region:'south',split:true" style="height: 200px;"></div>
                                    </div>
                                </div>
                                <div id="hztoolbar" style="padding: 4px;">
                                    <table cellpadding="0" cellspacing="0" style="width: 100%">
                                        <tr>
                                            <td style="padding-left: 2px">
                                                <div>
                                                    时间从:  
           <input id="Text1" class="easyui-datebox" style="width: 100px" />
                                                    到:  
           <input id="Text2" class="easyui-datebox" style="width: 100px" />
                                                    <select id="jdhz" class="easyui-combobox" name="jdhz" style="width: 80px;">
                                                        <option value="季度">季度</option>
                                                        <option value="一季度">一季度</option>
                                                        <option value="二季度">二季度</option>
                                                        <option value="三季度">三季度</option>
                                                        <option value="四季度">四季度</option>
                                                        <option value="当天">当天</option>
                                                    </select>
                                                    <select id="Select1" class="easyui-combobox" name="ptype" style="width: 60px;">
                                                        <option value="所有">所有</option>
                                                        <option value="卵">卵</option>
                                                        <option value="幼虫">幼虫</option>
                                                        <option value="蛹">蛹</option>
                                                        <option value="成虫">成虫</option>
                                                    </select>
                                                    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="reloadgridhz(1)">按种类汇总</a>
                                                    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="reloadgridhz(2)">按区域汇总</a>

                                                    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="Exportc('excel', $('#tt'));">导出</a>
                                                    <input name="idstr" id="idstr" type="hidden" />
                                                    <input name="idh" id="idh" type="hidden" />
                                                    <input name="city" id="city" type="hidden" />
                                                    <input name="st" id="st" type="hidden" />
                                                    <input name="et" id="et" type="hidden" />
                                                    <input name="otype" id="otype" type="hidden" value="2" />
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <uc1:copyright runat="server" ID="copyright" />
        </div>
    </div>
    


</asp:Content>

